package com.k7.mobile.platform.web.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.k7.mobile.platform.bo.IGramBO;
import com.k7.mobile.platform.bo.IRankingBO;
import com.k7.mobile.platform.dataobject.GramDO;
import com.k7.mobile.platform.dataobject.RankingDO;

/**
 * 首页
 * @author ouwa_bb
 *
 */
public class HotAction extends BaseAction{	
	private static final long serialVersionUID = -5048373149842002950L;
	
	private IGramBO gramBO;
	private Map jsonMap;	
	private Integer page;
	private Integer typeId;

	public String list() throws Exception {
		if(page == null)
			page = 1;
		jsonMap = new HashMap();
		RankingDO rankingDO = new RankingDO();
		rankingDO.setToPage(page);
		rankingDO.setTypeId(typeId);
		List<GramDO> list = gramBO.findRankingGameList(rankingDO);
		jsonMap.put("gramList", list);
		jsonMap.put("pageDO", rankingDO);
		return SUCCESS;
	}

	public Map getJsonMap() {
		return jsonMap;
	}

	
	public void setPage(Integer page) {
		this.page = page;
	}

	

	public Integer getTypeId() {
		return typeId;
	}

	public void setTypeId(Integer typeId) {
		this.typeId = typeId;
	}

	public Integer getPage() {
		return page;
	}

	public void setGramBO(IGramBO gramBO) {
		this.gramBO = gramBO;
	}
	
}
